package com.jic.member.api.rest;

import com.alibaba.fastjson.JSONObject;
import com.jic.common.base.vo.RestResult;
import com.jic.member.request.UserAddrRequest;
import com.jic.member.request.UserProductRequest;
import com.jic.member.request.UserRegistRequest;
import com.jic.member.request.UserUpdateImage;
import com.jic.member.response.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.FileNotFoundException;
import java.io.IOException;

@FeignClient(name = "jic-member",path = "/memberRegister")
public interface MemberRegisterApi {

    /**
     *
     *
     * @description: 以用户的code来获取它的token
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 16:08
     */
    @PostMapping("getsAccessToken")
    String getsAccessToken();


    /**
     *
     *
     * @description: 获取用户的图片
     * @return: 
     * @author: fengrui
     * @time: 2020/12/09 16:17
     */  
    @PostMapping("getMemberImage")
    RestResult<ImageResponse> getMemberImage();


    @PostMapping("skipMyproduct")
    RestResult<?> skipMyproduct(@RequestBody UserProductRequest user);


    @PostMapping("skipCheckIn")
    RestResult<?> skipCheckIn(@RequestBody UserProductRequest user);

    /**
     *
     *
     * @description: 修改用户头像
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 21:55
     */
    @PostMapping("uploadImage")
    RestResult<?> uploadImage(@RequestBody UserUpdateImage update) throws FileNotFoundException;



    @PostMapping("sendSms2")
    RestResult<?> sendSms2(@RequestBody JSONObject jsonObject);

    /**
     *
     *
     * @description:
     TODO
     * @return: 
     * @author: fengrui
     * @time: 2020/12/09 22:15
     */  
    @PostMapping("sendSms")
    RestResult<?>  sendSms(@RequestBody JSONObject param);


    /**
     *
     *
     * @description:
    TODO
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:15
     */
    @PostMapping("phoneLogin")
    RestResult<?> phoneLogin(JSONObject jsonObject);


    /**
     *
     *
     * @description: 获取用户信息
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:31
     */
    @PostMapping("getUserInfo")
    RestResult<?> getUserInfo(String accessTokenPri);

    
    @PostMapping("login")
    RestResult<?> login(JSONObject param);

    @PostMapping("regist")
    RestResult<?> regist(@RequestBody UserRegistRequest registRequest) throws IOException;











    }
